When creating software, writing code alone is insufficient to enable other programmers to quickly understand the purpose and function of that code. Proper form dictates that there should be some non-functional text along with the code that describes various aspects of its intended operation. Comments (also known as source documentation or Software Code Documentation) are written text that accompanies lines of code in computer software. Comments explain the function of a line of code or a group of lines of code and how it operates. This documentation is usually embedded within the source code itself so it is readily accessible to anyone who may be reading it.
Often, it is desirable to collect statistics regarding the amount of comments in a software listing in order to, e.g., ascertain how well documented the listing is. Code comment statistics tools generate code comment statistics information based on the number of lines that are comments and the number of lines that are the actual code. However, this approach is not always an accurate measure, as having lots of comments does not necessarily mean all the pieces/blocks of the code are well documented. For example, a user can have a lot of comments for a particular method or a parameter, while the remainder of the code is not commented at all. Accordingly, a need exists for a system and method of collecting code comment statistics that more accurately reflect how well the code is documented.